<?php
class M_configs extends Module {
  public function main() {
   Config::section( 'std' );

   if ( !empty( $_POST['sub'] ) ) {
     unset( $_POST['sub'] );
     foreach ( $_POST as $key => $val ) {
       Config::set( $key, $val );
     }
     Config::save();
   }

   $tmp = new Template( 'pan_config' );
   $tmp->assign( 'conf', Config::all() );
   return $tmp;
  }
}
?>